Handle leading whitespace in whitespace separated xcsv files again.
authorrobertl <robertl>
Thu, 18 Jan 2007 22:11:06 +0000 (22:11 +0000)
committerrobertl <robertl>
Thu, 18 Jan 2007 22:11:06 +0000 (22:11 +0000)
csv_util.c

index c0828747530694995581e20a6add7dfcb875dfe6..9b85b005c0762154324832103b2f6d0586cda11c 100644 (file)
@@ -1008,7 +1008,10 @@ xcsv_data_read(void)
     
     while ((buff = gbfgetstr(xcsv_file.xcsvfp))) {
         linecount++;
-        buff = lrtrim(buff);
+       /* Whack trailing space; leading space may matter if our field sep
+        * is whitespace and we have leading whitespace. 
+        */
+        buff = rtrim(buff);
 
         /* skip over x many lines on the top for the prologue... */
         if ((xcsv_file.prologue_lines) && ((linecount - 1) <